.TH ION 1
.SH NAME
Ion - an X11 window manager
.SH SYNOPSIS
.B ion
.I "[options]"
.SH "DESCRIPTION"

Ion is a tiling tabbed window manager designed with keyboard users in mind.
 
.SH "OPTIONS"
.TP
.B \-display host:display.screen
X display to manage
.TP
.B \-cfgfile configfile
Configuration file to use instead of default
.TP
.B \-moduledir dir
Directory to search for module
.TP
.B \-confdir dir
Directory to search for configuration files and other scripts
.TP
.B \-oneroot
On X servers with multiple (traditional non-Xinerama) screens, manage only
default screen (root window), not all, as given by the -display option or
in the DISPLAY environment variable.
.TP
.B \-sessionname session_name
Set session name. This option affects where workspace and other save files are
put (~/.ion2/session_name if option set).
.TP
.B \-xinerama 0|1
If Ion was compiled with Xinerama support, this option can be used to
enable/disable (1/0) the use of it. The default is to use Xinerama
screen information.
.TP
.B \-i18n
Enable use of multi-byte string routines, actual encoding depending on the
locale.
.TP
.B \-help
Show help on command line options
.TP
.B \-version
Show version
.TP
.B \-about
Show about text (version, copyright)

.SH BASIC CONCEPTS

This section is an overview of the types objects that appear on an X
display managed by Ion and their relationships in a standard setup.
This information is necessary to understand the operations of different
key bindings. For a more detailed explanation, needed for writing
custom bindings configuration files, see the additional documentation
available from the Ion Web page.

The top-level objects that matter are screens and they correspond to
physical screens. Screens contain workspaces and client windows put in
full screen mode. Only one of these "multiplexed" objects can be viewed
at a time. 

Two types of workspaces are currently supported; tiled (traditional Ion-style) 
and floating (PWM-style). Workspaces are not visible objects but rather 
collections of frames. Frames are the objects with decorations such as 
tabs and borders and there are two types of these corresponding to the
different types of workspaces.

Frames contain (multiplex) client windows, to each of which corresponds a
tab in the frame's decoration. Only one client window (or other object) 
can be shown at a time in each frame. (In a traditional window manager
each frame may contain exactly one client window.)

"Queries" are boxes that appear at the bottoms of frames or screens 
and are used to ask the user for textual input. Most queries support 
tab-completion.


.SH KEYS

These are the default key bindings.
.B Mod1
depends on your system. On PC:s with XFree86 it is probably bound to the left
Alt key (\fBAlt_L\fP).
On Suns it is usually bound to the diamond keys (\fBMeta_L\fP, \fBMeta_R\fP). Use
\fIxmodmap(1x)\fP to find out.

.SS F-keys

.TP
.B F1
Show manual page (query, uses ion-man). Tab-completion can be enabled by
specifying a list of directories in the variable query_man_path.
.TP
.B Mod1+F1
Show Ion manual page.
.TP
.B F2
Run an xterm.
.TP
.B F3
Run a program (query). Precede the program name with a colon (:) to run in xterm (ion-runinxterm).
.TP
.B Mod1+F3
Open a Lua code query. You can call all the functions listed in the
Ion configuration document (see section SEE ALSO) here. The 
variable "_" is bound to the frame in which the query was opened.
.TP
.B F4
Start new SSH session (query, uses ion-ssh). Hosts to tab-complete are
read from ~/.ssh/known_hosts.
.TP
.B F5
Open a file for editing (query). Uses ion-edit which by default uses run-mailcap.
.TP
.B F6
Open a file for viewing (query). Uses ion-view which by default uses run-mailcap.
.TP
.B F9
Go to existing workspace or create new (query). If a non-existent
workspace was entered, the type of the workspace to be created will
be queried as well.
.TP
.B Mod1+F9
Create a new workspace (of type controlled with the default_ws_type variable)
with a default name formed from the type of the workspace.
.TP
.B F12
Main menu

.SS Navigation

.TP
.B Mod1+n
Go to n:th workspace (n=1..9, 0)
.TP
.B Mod1+Right
Go to next workspace
.TP
.B Mod1+Left
Go to previous workspace
.TP
.B Mod1+Shift+n
Go to n:th screen (n=1,2)
.TP
.B Mod1+Shift+Right
Go to next screen
.TP
.B Mod1+Shift+Left
Go to previous screen
.TP
.B Mod1+G
Go to client (query; only works in a frame)
.TP
.B Mod1+K K
Go to previously active object


.IP "\fINavigation on tiled workspaces\fR"

.TP
.B Mod1+N
Go to frame below current frame
.TP
.B Mod1+P
Go to frame above current frame
.TP
.B Mod1+Tab
Go to frame right of current frame
.TP
.B Mod1+K Tab
Go to frame left of current frame

.IP "\fINavigation on floating workspaces\fR"

.TP
.B Mod1+N
Raise frame
.TP
.B Mod1+P
Lower frame
.TP
.B Mod1+Tab
Circulate focus and raise
.TP
.B Mod1+K Tab
Back-circulate focus and raise

.SS Closing and destroying objects.

.TP
.B Mod1+C
Close active object if possible
.TP
.B Mod1+K C
Kill client owning current client window (if any)
.TP
.B Mod1+K X
Destroy frame

.SS Frame operations

.TP
.B Mod1+K N
Go to next client window within frame
.TP
.B Mod1+K P
Go to previous client window within frame
.TP
.B Mod1+K n
Go to n:th client window within frame (n=1..9, 0)
.TP
.B Mod1+A
Attach named client window in the frame (query)
.TP
.B Mod1+M
Frame context menu


.IP "\fITags\fR"

.TP
.B Mod1+T
Toggle current client window's tag state (indicated by a right-angle
in the top-right corner of the window's tab)
.TP
.B Mod1+K T
Clear all objects' tag state
.TP
.B Mod1+K A
Attach all tagged windows to the frame

.IP "\fIResizing and splitting\fR"

.TP
.B Mod1+K V
Maximize vertically
.TP
.B Mod1+K H
Maximize horizontally
.TP
.B Mod1+S
Split vertically (tiled workspaces only)
.TP
.B Mod1+K S
Split horizontally (tiled workspaces only)
.TP
.B Mod1+R
Enter resize mode

.IP "\fIResize mode bindings\fR"

.TP
.B Left, Right, Up Down or F, B, P, N
Grow the frame in the specific direction
.TP
.B Shift+Left, Right, Up Down or Shift+F, B, P, N
Shrink the frame in the specific direction
.TP
.B Mod1+Left, Right, Up Down or Mod1+F, B, P, N
On floating frame workspaces: move the frame in the specific direction.

.SS Miscellaneous
.TP
.B Mod1+L
Broken application resize kludge; try to make that broken application
that didn't get it the first time to understand the real size of the
active window
.TP
.B Mod1+K Q
Send next key press to active client window.
.TP
.B Mod1+Enter
Toggle client window full screen mode.


.SH LINE-EDITING KEYS

These keys can be used in the line editor (queries). They are similar to
those of the \fIjoe(1)\fP editor.
Selection works differently, though, while the keys are equivalent.

.SS Movement

.TP
.B Control+F, Right arrow
Go forward character
.TP
.B Control+B, Left arrow
Go backward character
.TP
.B Control+E, End
Go to end of line
.TP
.B Control+A, Home
Go to beginning of line
.TP
.B Control+Z
Backward skip word
.TP
.B Control+X
Forward skip word

.SS Delete

.TP
.B Control+D, Delete
Delete next character
.TP
.B Control+H, Backspace
Delete previous character
.TP
.B Control+J
Delete to end of line
.TP
.B Control+Y
Delete whole line
.TP
.B Control+W
Delete word
.TP
.B Control+O
Backward delete word

.SS Selections

.TP
.B Control+K B
Set mark (begin selection)
.TP
.B Control+K K
Copy selection
.TP
.B Control+K Y
Cut selection
.TP
.B Control+K C
Paste

.SS Completion and history

.TP
.B Tab
Complete or list possible completions (if available)
.TP
.B Control+U, Page up
Scroll completions up
.TP
.B Control+V, Page down
Scroll completions down
.TP
.B Control+P, Up arrow
Previous history entry
.TP
.B Control+N, Down arrow
Next history entry

.SS Cancel, accept

.TP
.B Control+C, Escape
Cancel
.TP
.B Control+M, Enter
Accept

.SH POINTING DEVICE BUTTONS

The bindings for the two types of frames are again different because not
all legacy/floating frame actions are available on tiled frames and thus
those buttons have been mapped to other actions.

.SS Tiled frames

.TP
.B Button1 (left) or Button2 (middle) on tab
Click: switch client, drag: drag&drop clients between frames
.TP
.B Button1 (left) on border
Drag: resize
.TP
.B Mod1+Button1 (left) or Mod1+Button3 (right)
Resize.
.TP
.B Button3 (right) on tab
Context menu

.SS Floating frames

.TP
.B Button1 (left)
Press: raise frame, click tab: switch client, double-click tab: toggle
shade mode, drag border: resize, drag elsewhere: move frame
.TP
.B Button2 (middle) on tab
Click: switch client, drag: drag&drop clients between frames
.TP
.B Mod1+Button1 (left)
Click: raise, drag: move
.TP
.B Mod1+Button3 (right)
Click: lower, drag: resize
.TP
.B Button3 (right) on tab
Context menu

.SH FILES AND DIRECTORIES
.TP
.B ETCDIR/
System default configuration files
.TP
.B ETCDIR/ion.lua
System default main configuration files
.TP
.B ETCDIR/look-*.lua
Colour scheme configuration files
.TP
.B ~/.ion2/
User configuration files
.TP
.B ~/.ion2/ion.lua
User default configuration file (overrides system default)

.SH SEE ALSO
The Ion home page, \fIhttp://iki.fi/tuomov/ion/\fP
.PP
The document "Ion: Configuring and extending with Lua" found on the
Ion home page.
.PP
.I DOCDIR/
.PP
\fIX(7x)\fP, \fIpwm(1)\fP, \fIjoe(1)\fP

.SH AUTHOR
Ion was written by Tuomo Valkonen <tuomov at iki.fi>.
